package com.juhui.system.dubbo;

import com.juhui.system.api.RemoteConfigService;
import com.juhui.system.service.ISysConfigService;
import lombok.RequiredArgsConstructor;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.stereotype.Service;

/**
 * 配置服务
 *
 * @author Michelle.Chung
 */
@RequiredArgsConstructor
@Service
@DubboService
public class RemoteConfigServiceImpl implements RemoteConfigService {

    private final ISysConfigService configService;

    /**
     * 获取注册开关
     */
    @Override
    public boolean selectRegisterEnabled() {
        return configService.selectRegisterEnabled();
    }

	@Override
	public String getConfigValue(String configKey) {
		return configService.selectConfigByKey(configKey);
	}

}
